﻿// --------------------------------------------------------------------------------------
// 	文 件 名: ImtSysManagerServer.cs
// --------------------------------------------------------------------------------------
// 	创建时间: 2021/12/09
// 	版　　本: Version:  1.0.0
// 	版    权: Copyright (C) 2016 - 2021 NUCTECH All Rights Reserved
// 	作    者: chenyu
// --------------------------------------------------------------------------------------
// 	说    明: MTS - ImtSysManagerServer。
// --------------------------------------------------------------------------------------
// 	修改历史:
// 			日期							改动
//		2021.12.09						  创建模块
// --------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Text;
using SH;

namespace MTS
{


	public interface ImtSysManageServerCallback : ImtCallback
	{

		const int _classID = 8702;
		const string _interfaceName = "mtSysManageServerCallback";
		const int SysManageGStationRunStatusNotify = 18;
		const int SysManageGetGSystemRunStatus = 19;
		const int SysManageGWFTaskProcessInfoNotify = 20;


		shErrorCode OnGetStatusString(ulong sc, string strStatus);

		shErrorCode OnRemoteStationOnline(mtStationInfo info);

		shErrorCode OnRemoteStationOffline(mtStationInfo info);

		shErrorCode OnRemoteStationConnected(mtStationInfo info);

		shErrorCode OnRemoteStationDisConnected(mtStationInfo info);

		shErrorCode OnRemoteStationUpdateCredential(mtStationInfo info, mtCredential crd);


		//通知任务过程信息信息。汇报任务进展情况。
		[mtFuncID("SysManageGWFTaskProcessInfoNotify", SysManageGWFTaskProcessInfoNotify)]
		shErrorCode OnGWFTaskProcessInfoNotify(mtGWFTaskProcessInfo info);

		//接收到某个分系统的运行状态

		[mtFuncID("SysManageGStationRunStatusNotify", SysManageGStationRunStatusNotify)]
		shErrorCode OnGStationRunStatusNotify(mtGStationRunStatusInfo info);

		[mtFuncID("SysManageGetGSystemRunStatus", SysManageGetGSystemRunStatus)]
		shErrorCode OnGetGSystemRunStatus(out mtGSystemStatus info);
	}

	public interface ImtSysManagerServer : Imt
	{
		public shErrorCode Start();

		public shErrorCode Stop();

		public shErrorCode KickOut(string token);

		public shErrorCode StatusChange(string token, ref ulong sc);

		public shErrorCode RunStatusChange(string token, ref uint status);

		//获取指定Token 的crd
		public shErrorCode GetCredential(string token, ref mtCredential crd);

		//获取当前回调线程的crd， 必须在回调函数内使用。否则返回失败
        public shErrorCode GetCurCredential(ref mtCredential crd);

        //获取当前回调线程的logon信息， 必须在回调函数内使用。否则返回失败
        public shErrorCode GetCurLogonInfo(ref mtLogOnInfo info);

        //获取当前回调线程的站点信息， 必须在回调函数内使用。否则返回失败
        public shErrorCode GetCurStationInfo(ref mtStationInfo info);

		public string GetCurToken();

        // add by tangyetao  created by chenyu1 2021/10/13 新增接口
        //发布新的工作流任务
        public shErrorCode PublishGWorkFlowTask(mtGWFTask wfTask);
		//更新工作流任务
		public shErrorCode UpdateGWorkFlowTask(mtGWFTask wfTask);
		//取消工作流任务
		public shErrorCode CancleGWorkFlowTask(mtGWFTask wfTask);

		//发布整体系统的状态
		public shErrorCode PublishGSystemStatus(mtGSystemStatus wfSystemStatus);

	}
}
